package cn.mw.cmdb.link.enums;

/**
 * @description 线路获取历史数据类型
 */
public enum LinkHistoryTypeEnum {
    FLOW(1,"流量"),
    DELAY(2,"延迟"),
    LOSS_RATE(3,"丢包率"),
    ;

    private Integer type;

    private String desc;

    LinkHistoryTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static LinkHistoryTypeEnum getHistoryTypeEnum(Integer type) {
        for (LinkHistoryTypeEnum historyTypeEnum : values()) {
            if (type.equals(historyTypeEnum.getType())) {
                return historyTypeEnum;
            }
        }
        return null;
    }
}
